public class xiti3_5 {
  public static void main(String[] args) {
    int a = 10,sum=0,k;
    for(int i = 1; i<=a; i++){
      k=1;
      for(int j=1;j<=i;j++){
          k=k*j;
      }
      sum=sum+k;
    }
    System.out.println("1!+2!+3!+4!+5!+6!+7!+8!+9!+10!= " +sum);
  }
}
